package serialport

import android_serialport_api.SerialPort
import java.io.File

class Port(name: String) : SerialPort(File(name), 9600, 0) {
    private val out = outputStream
    private val input = inputStream

    fun write(byteArray: ByteArray) {
        out.write(byteArray)
    }

    fun read(byteArray: ByteArray): Int {
        return input.read(byteArray)
    }
}